<template>
	<div id="app">
		<router-view />
	</div>
</template>

<script>
	import settings from '@/settings';

	export default {
		name: 'App',
		mounted() {
			const token = this.$store.getters.token;
			if (settings.socket && token) {
				this.$store
					.dispatch('socket/connect', { Authorization: token, ack: 'client' })
					.then(({ frame }) => {
						console.log(frame);
					})
					.catch(e => {
						console.log(e);
					});
			}
		}
	};
</script>
